﻿using MyVideoPlayer.Enums;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyVideoPlayer.Converters
{
    public class RepeatToolTipConverter : ValueConverterBase
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is RepeatEnum Repeat)
            {
                return Repeat switch
                {
                    RepeatEnum.None => "循环播放：关",
                    RepeatEnum.RepeatOnce => "循环播放：单循环",
                    RepeatEnum.Repeat => "循环播放：全循环",
                    _ => "循环播放：关",
                };
            }
            return "循环播放：关";
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
